import request from "@/utils/request";

// 创建申请-只有老师角色才能创建
export function addBookApply(data) {
  return request({
    url: "/system/audit/add",
    method: "post",
    data,
  });
}

// 查看申请列表
export function getBookApplyList(params) {
  return request({
    url: "/system/audit/list/",
    method: "get",
    params,
  });
}

// 查看申请详情
export function getBookApplyInfo(id) {
  return request({
    url: "/system/audit/getBookApplyInfo/" + id,
    method: "get",
  });
}

/** 查看申请状态 */
export function getBookApplyStatus(params) {
  return request({
    url: "/system/audit/getApplyStatus",
    method: "get",
    params,
  });
}

/** 撤销申请  */ 
export function getAuditStatusWithdraW(params) {
  return request({
    url: "/system/audit/auditStatusWithdraW",
    method: "get",
    params,
  });
}

// 根据名称搜索教材
export function getBookListByName(params) {
  return request({
    url: "/system/book/searchByBookName",
    method: "get",
    params,
  });
}
